<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGroupsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('groups', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->integer('group_id')->nullable();
            $table->string('group_name', 45)->nullable();
            $table->integer('parent_id')->nullable();
            $table->integer('thread_id')->nullable();
            $table->integer('group_flag')->nullable();
            $table->string('group_type', 45)->nullable();
            $table->string('group_value', 45)->nullable();
            $table->dateTime('created_at')->nullable()->useCurrent();
            $table->dateTime('updated_at')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable()->default(0);
            $table->bigInteger('updater_id')->nullable()->default(0);
            $table->integer('deleted')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('groups');
    }
};
